<template>
  <div>
      <input type="text" v-model="input">
      <button @click="submit">提交</button>
  </div>
</template>
<script>
import axios from "axios";
export default {
    name:"Index",
    methods:{
        //接收跨域后的回调值
        submit(){
            axios.get("/api/user.json").then((res)=>{
                console.log(res);
            })
        }
    },
    data(){
        return {
            input:"",
        }
    }
}
</script>